﻿<Project Sdk="Microsoft.NET.Sdk">

    <PropertyGroup>
        <TargetFramework>net6.0</TargetFramework>
        <LangVersion>latest</LangVersion>
        <OutputType>WinExe</OutputType>
        <Nullable>enable</Nullable>
        <TrimMode>copyused</TrimMode>
        <ApplicationIcon>bookshelf.ico</ApplicationIcon>
        <BuiltInComInteropSupport>true</BuiltInComInteropSupport>
    </PropertyGroup>

    <ItemGroup>
        <ProjectReference Remove="..\..\Libs\AM.Core5\AM.Core5.csproj" />
        <ProjectReference Remove="..\..\Libs\ManagedIrbis5\ManagedIrbis5.csproj" />
    </ItemGroup>

    <ItemGroup>
        <TrimmableAssembly Include="Avalonia.Themes.Fluent" />
    </ItemGroup>

    <PropertyGroup>
        <AvaloniaVersion>0.10.22</AvaloniaVersion>
        <MicrosoftVersion>6.0.0</MicrosoftVersion>
        <MicrosoftVersionAlt>6.0.0</MicrosoftVersionAlt>
    </PropertyGroup>

    <ItemGroup>
        <PackageReference Include="Avalonia" Version="$(AvaloniaVersion)" />
        <PackageReference Include="Avalonia.Desktop" Version="$(AvaloniaVersion)" />
        <PackageReference Include="Avalonia.Diagnostics" Version="$(AvaloniaVersion)" />
        <PackageReference Include="Avalonia.ThemeManager" Version="0.10.8" />
        <PackageReference Include="Microsoft.Extensions.Configuration" Version="$(MicrosoftVersion)" />
        <PackageReference Include="Microsoft.Extensions.Configuration.CommandLine" Version="$(MicrosoftVersion)" />
        <PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="$(MicrosoftVersion)" />
        <PackageReference Include="Microsoft.Extensions.Hosting" Version="$(MicrosoftVersion)" />
    </ItemGroup>

    <ItemGroup>
        <AvaloniaResource Include="bookshelf.ico" />
    </ItemGroup>


    <ItemGroup>
        <None Update="appsettings.json">
            <CopyToOutputDirectory>Always</CopyToOutputDirectory>
        </None>
        <None Update="books.txt">
            <CopyToOutputDirectory>Always</CopyToOutputDirectory>
        </None>
    </ItemGroup>
</Project>
